Repository navigation
test(omchem): improve automated test coverage for OMChem unit operations and Flowsheet simulation - #142
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR significantly expands automated unit test coverage for the
OMChempackage and its core simulation orchestrator (Flowsheet) and achieves 100% test coverage across all OMChem runtime modules.Key Improvements
OMChem Unit Operations (
tests/test_omchem_models.py):DistColandShortcutColumncoveringOM_Flowsheet_InitandOM_Flowsheet_Eqnacross diverse modes (reflux ratio vs. temperature/side-draw,single/multiple feeds, total vs. partial condenser, and energy streams
Qcond/Qreb).AdiabaticCompressorandAdiabaticExpanderacross all supported modes (pressInc,outP,reqPow,pressDrop,genPow).CompSep,Heater,Cooler,Pump,Valve,Flash,Mixer,Splitter, andEngStmparameter getters/setters,getname(),modesList(),and energy flow (
enFlo) equation handling.Flowsheet Simulation Lifecycle (
tests/test_flowsheet.py):SM) simulation lifecycle (simulate_SMandsend_for_simulation_SM), validating topological sort resolution across all 4 branching conditions,stream property updates (
stm.Prop), and multi-unit CSV aggregation intoFlowsheetSEQ.csv.EQN) execution with mock OpenModelica (omc) processes,package.ordersynchronization, and cleanup of stray.mofiles.omc, startup flags, error decoder fallbacks, and CSV result parsing edge cases.